package org.jsola.hr.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import org.jsola.core.dto.BaseDTO;

import javax.validation.constraints.NotNull;

import static org.jsola.core.example.BaseExample.E_ID;
import static org.jsola.core.example.BaseExample.M_ID_NOT_NULL;
import static org.jsola.core.example.BaseExample.N_ID;
import static org.jsola.hr.example.ProductExample.E_IS_PRINCIPAL;
import static org.jsola.hr.example.ProductExample.E_PRODUCT_COVER;
import static org.jsola.hr.example.ProductExample.E_PRODUCT_INTRODUCE;
import static org.jsola.hr.example.ProductExample.E_PRODUCT_NAME;
import static org.jsola.hr.example.ProductExample.E_PRODUCT_SERVICE_CHARGE;
import static org.jsola.hr.example.ProductExample.E_PRODUCT_TAG;
import static org.jsola.hr.example.ProductExample.E_PRODUCT_TYPE_ID;
import static org.jsola.hr.example.ProductExample.E_PRODUCT_URL;
import static org.jsola.hr.example.ProductExample.M_PRODUCT_COVER_MAX;
import static org.jsola.hr.example.ProductExample.M_PRODUCT_INTRODUCE_MAX;
import static org.jsola.hr.example.ProductExample.M_PRODUCT_NAME_MAX;
import static org.jsola.hr.example.ProductExample.M_PRODUCT_SERVICE_CHARGE_MAX;
import static org.jsola.hr.example.ProductExample.M_PRODUCT_TAG_MAX;
import static org.jsola.hr.example.ProductExample.M_PRODUCT_TYPE_ID_MAX;
import static org.jsola.hr.example.ProductExample.M_PRODUCT_URL_MAX;
import static org.jsola.hr.example.ProductExample.N_IS_PRINCIPAL;
import static org.jsola.hr.example.ProductExample.N_PRODUCT_COVER;
import static org.jsola.hr.example.ProductExample.N_PRODUCT_INTRODUCE;
import static org.jsola.hr.example.ProductExample.N_PRODUCT_NAME;
import static org.jsola.hr.example.ProductExample.N_PRODUCT_SERVICE_CHARGE;
import static org.jsola.hr.example.ProductExample.N_PRODUCT_TAG;
import static org.jsola.hr.example.ProductExample.N_PRODUCT_TYPE_ID;
import static org.jsola.hr.example.ProductExample.N_PRODUCT_URL;

/**
 * 产品
 *
 * @author zhr
 */
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "修改【产品】的参数")
@Data
public class ProductUpdateDTO extends BaseDTO {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(notes = N_ID, example = E_ID, required = true)
    @NotNull(message = M_ID_NOT_NULL)
    private String id;

    @ApiModelProperty(notes = N_PRODUCT_TYPE_ID, example = E_PRODUCT_TYPE_ID)
    @Length(max = 32, message = M_PRODUCT_TYPE_ID_MAX)
    private String productTypeId;

    @ApiModelProperty(notes = N_PRODUCT_NAME, example = E_PRODUCT_NAME)
    @Length(max = 32, message = M_PRODUCT_NAME_MAX)
    private String productName;

    @ApiModelProperty(notes = N_IS_PRINCIPAL, example = E_IS_PRINCIPAL)
    private Boolean isPrincipal;

    @ApiModelProperty(notes = N_PRODUCT_TAG, example = E_PRODUCT_TAG)
    @Length(max = 2147483647, message = M_PRODUCT_TAG_MAX)
    private String productTag;

    @ApiModelProperty(notes = N_PRODUCT_INTRODUCE, example = E_PRODUCT_INTRODUCE)
    @Length(max = 50, message = M_PRODUCT_INTRODUCE_MAX)
    private String productIntroduce;

    @ApiModelProperty(notes = N_PRODUCT_SERVICE_CHARGE, example = E_PRODUCT_SERVICE_CHARGE)
    @Length(max = 32, message = M_PRODUCT_SERVICE_CHARGE_MAX)
    private String productServiceCharge;

    @ApiModelProperty(notes = N_PRODUCT_URL, example = E_PRODUCT_URL)
    @Length(max = 2147483647, message = M_PRODUCT_URL_MAX)
    private String productUrl;

    @ApiModelProperty(notes = N_PRODUCT_COVER, example = E_PRODUCT_COVER)
    @Length(max = 255, message = M_PRODUCT_COVER_MAX)
    private String productCover;


}

